package com.wzcl.app.model.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.wzcl.app.dao.model.Course;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class UserCourseDto extends BaseDto {

    @NotNull(message = "用户ID不能为空")
    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "用户电话")
    private String userPhone;

    @NotNull(message = "课程ID不能为空")
    @ApiModelProperty(value = "课程id")
    private Integer courseId;

    @ApiModelProperty(value = "课程类型")
    private Integer courseType;

    @ApiModelProperty(value = "科目")
    private Integer subjectId;

    @ApiModelProperty(value = "日期")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "中文难度")
    private String hardZh;

    @ApiModelProperty(value = "学科")
    private String subjectZh;

    @ApiModelProperty(value = "课程")
    private Course course;

    @Override
    public String toString() {
        return "UserCourseDto{" +
                "userId=" + userId +
                ", userPhone='" + userPhone + '\'' +
                ", courseId=" + courseId +
                ", courseType=" + courseType +
                ", subjectId=" + subjectId +
                ", createTime=" + createTime +
                ", hardZh='" + hardZh + '\'' +
                ", subjectZh='" + subjectZh + '\'' +
                ", course=" + course +
                '}';
    }
}
